<?php


namespace app\hotel\controller;


use app\BaseController;
use app\model\Hotel;
use app\service\HotelService;
use think\App;

class HotelController extends BaseController
{
    private $HotelService;

    public function __construct(App $app)
    {
        $this->HotelService = new HotelService();
        parent::__construct($app);
    }

    public function getHotel(Hotel $hotel){
        return $this->returnJson(
            $this->HotelService->getHotelOnlyRoom($hotel->id)
        );
    }
}